/* 聊天容器样式 */
.chat-container {
    display: flex;
    height: calc(100vh - 60px);
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 侧边栏样式 */
.chat-sidebar {
    width: 300px;
    background-color: #fff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.user-info {
    padding: 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #1890ff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
}

.username {
    font-weight: bold;
    font-size: 16px;
}

.conversation-list {
    flex: 1;
    overflow-y: auto;
}

.list-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.list-header h3 {
    margin: 0;
    font-size: 16px;
}

.new-chat-btn {
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.conversation-item {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.conversation-item:hover {
    background-color: #f9f9f9;
}

.conversation-item.active {
    background-color: #e6f7ff;
}

.conversation-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #1890ff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-title {
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-preview {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-badge {
    background-color: #ff4d4f;
    color: white;
    border-radius: 10px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    padding: 0 6px;
}

.empty-state {
    padding: 20px;
    text-align: center;
    color: #888;
}

.start-chat-btn {
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    margin-top: 10px;
    cursor: pointer;
}

.loading {
    padding: 20px;
    text-align: center;
    color: #888;
}

/* 主聊天区域样式 */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #f5f5f5;
}

.chat-header {
    padding: 15px;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h2 {
    margin: 0;
    font-size: 18px;
}

.chat-actions {
    display: flex;
}

.action-btn {
    background: none;
    border: none;
    color: #1890ff;
    font-size: 18px;
    cursor: pointer;
    margin-left: 10px;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message {
    display: flex;
    margin-bottom: 15px;
    max-width: 70%;
}

.message-received {
    align-self: flex-start;
}

.message-sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #1890ff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 10px;
    flex-shrink: 0;
}

.message-content {
    background-color: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message-sent .message-content {
    background-color: #e6f7ff;
}

.message-sender {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
}

.message-text {
    word-break: break-word;
}

.message-time {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    text-align: right;
}

.empty-messages {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.chat-input {
    padding: 15px;
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
    display: flex;
}

.chat-input textarea {
    flex: 1;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 8px 12px;
    resize: none;
    outline: none;
}

.chat-input textarea:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.send-btn {
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    width: 40px;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:disabled {
    background-color: #d9d9d9;
    cursor: not-allowed;
}

.empty-chat {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-chat-content {
    text-align: center;
    color: #888;
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-dialog {
    background-color: white;
    border-radius: 8px;
    width: 500px;
    max-width: 90%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #888;
}

.modal-body {
    padding: 15px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.cancel-btn {
    background-color: #f5f5f5;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 8px 16px;
    margin-right: 10px;
    cursor: pointer;
}

.create-btn {
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
}

.create-btn:disabled {
    background-color: #d9d9d9;
    cursor: not-allowed;
}

/* 参与者列表样式 */
.participants-list {
    margin-bottom: 20px;
}

.participant-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.participant-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #1890ff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
}

.participant-name {
    flex: 1;
}

.remove-btn {
    background: none;
    border: none;
    color: #ff4d4f;
    cursor: pointer;
}

.add-participant h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.add-participant .form-group {
    display: flex;
}

.add-participant select {
    flex: 1;
    margin-right: 10px;
}

.add-btn {
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
}

.add-btn:disabled {
    background-color: #d9d9d9;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
        height: 100vh;
    }
    
    .chat-sidebar {
        width: 100%;
        height: 300px;
    }
    
    .message {
        max-width: 90%;
    }
} 